#ifndef _DANIEL_KERR_GLTKG_H
#define _DANIEL_KERR_GLTKG_H

#include "driver.h"
#include "gltext.h"

int displayTurnKillGo(vector <string> data)
{
	glPushAttrib(GL_ENABLE_BIT);
		glDisable(GL_DEPTH_TEST);	
		glDisable(GL_LIGHTING);
		glDisable(GL_BLEND);	
	glMatrixMode(GL_PROJECTION);
	glPushMatrix();
		glLoadIdentity();
	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();
		glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
		glLoadIdentity();
		gluOrtho2D(0,X_DIM,Y_DIM,0);

		vector <string> optionStr;
		vector <string> who;
		vector <string> theirInfo;
		vector <string> myInfo;
		who.push_back(data[0]);
		who.push_back(data[1]);
		who.push_back(data[2]);
		who.push_back(data[3]);

		theirInfo.push_back(data[4]);
		theirInfo.push_back(data[5]);

		myInfo.push_back(data[7]);			//force size
		myInfo.push_back(data[8]);			//force prep

		optionStr.push_back("What would you like to do?");
		optionStr.push_back("  (t)urn back");
		optionStr.push_back("  (a)ttack");


		glColor4f(0.0,1.0,0.0,1.0);		writeText(258,146,0.2,0.15,"You're attacking...");
		glColor4f(0.5,0.5,0.5,1.0);		glRectf(258,148,542,232);
		glColor4f(0.1,0.1,0.1,1.0);		glRectf(260,150,540,230);
		glColor4f(1.0,1.0,1.0,0.4);		writeText(262,146,0.12,0.10,20,who);

		glColor4f(1.0,0.0,0.0,0.4);		writeText(123,276,0.2,0.15,"Attacker");
		glColor4f(0.5,0.5,0.5,1.0);		glRectf(123,278,377,322);
		glColor4f(0.1,0.1,0.1,1.0);		glRectf(125,280,375,320);
		glColor4f(1.0,1.0,1.0,0.4);		writeText(127,276,0.12,0.10,20,myInfo);

		glColor4f(1.0,1.0,1.0,1.0);		writeText(385,310,0.2,0.2,"vs.");
		
		glColor4f(0.0,0.0,1.0,0.4);		writeText(423,276,0.2,0.15,"Defender");
		glColor4f(0.5,0.5,0.5,1.0);		glRectf(423,278,677,322);
		glColor4f(0.1,0.1,0.1,1.0);		glRectf(425,280,675,320);
		glColor4f(1.0,1.0,1.0,0.4);		writeText(427,276,0.12,0.10,20,theirInfo);

		glColor4f(0.5,0.5,0.5,1.0);		glRectf(273,368,527,437);
		glColor4f(0.1,0.1,0.1,1.0);		glRectf(275,370,525,435);
		glColor4f(1.0,1.0,1.0,0.4);		writeText(277,366,0.12,0.10,20,optionStr);

		SDL_GL_SwapBuffers();

	glMatrixMode(GL_MODELVIEW);
		glPopMatrix();
	glMatrixMode(GL_PROJECTION);
		glPopMatrix();
	glPopAttrib();

	SDL_Event event;
	while(true)
	{
		while(SDL_PollEvent(&event))
		{
			if(event.type==SDL_KEYDOWN)
			{
				switch(event.key.keysym.sym)
				{
					case SDLK_t: return 0; break;
					case SDLK_a: return 1; break;
					case SDLK_m: return 2; break;
				}
			}
		}
	}
}

#endif